﻿using Dsl.Ped.Editor;
using Dsl.Ped.Editor.Interfaces;

namespace Dsl.Ped.Desktop.Modules.Editor
{
    /// <summary>
    /// Interaction logic for EditorView.xaml
    /// </summary>
    public partial class EditorView 
    {
        /// <summary>
        /// Instantiates new <see cref="EditorView"/>
        /// </summary>
        /// <param name="editor">Instance of <see cref="IDslPedEditor"/> wrapped in the view</param>
        public EditorView(IDslPedEditor editor)
        {
            InitializeComponent();
            // Create new view model with respect to the given editor
            DataContext = new EditorViewModel(editor);
        }
    }
}
